[monitoring-template] feat(mysql): add database account expiry metrics#3969
Merged
zqr10159 merged 8 commits intoJan 18, 2026
Merged
Conversation
Contributor
Author
|
Manual validation was performed with real MySQL users. The SQL result from mysql.user and the HertzBeat Account Expiry panel show identical:
This confirms the template, collector and UI pipeline are working correctly. |
12 tasks
tomsun28
reviewed
Jan 15, 2026
Comment on lines
+1
to
+13
| # MySQL Account Expiry | ||
|
|
||
| HertzBeat supports monitoring of MySQL database account password expiration, | ||
| allowing administrators to detect expired or soon-to-expire accounts and | ||
| configure alerts. | ||
|
|
||
| --- | ||
|
|
||
| ## Metric: account_expiry | ||
|
|
||
| This metric collects password expiration information for all MySQL users. | ||
|
|
||
| ### Fields |
Member
There was a problem hiding this comment.
hi the document md can not put in the define yml dir. The website doc is a good place.
Contributor
Author
There was a problem hiding this comment.
Thanks! I’ve moved the MySQL account expiry documentation into the website help docs as suggested.
Member
|
Please fix markdown error. |
Contributor
Author
|
Thanks for pointing it out! I’ve fixed the markdown issue by updating the MySQL account expiry documentation:
Please let me know if anything else needs adjustment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed?
This PR adds database account expiry monitoring for MySQL as part of issue #2757.
A new
account_expirymetric is introduced inapp-mysql.ymlthat exposes:This enables HertzBeat users to alert on:
Verification
I validated this using real MySQL users:
Test users:
test_expire_5 → 4 days remaining
test_expired → expired
HertzBeat UI shows the same values for Days Left and Expired flag.
Screenshots attached:


Checklist
Add or update API